# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 76
n 76(None)[return NavigatorEventHandler.event_toggle_menu(self, event)
]:
	i: 0(AL), 75()
	o: 

nname: 75
n 75(None)[]:
	i: 13(AF), 71()
	o: 76()

nname: 71
n 71(None)[]:
	i: 23(f), 57()
	o: 75()

nname: 57
n 57(None)[menu.action_info()
continue
]:
	i: 23(t)
	o: 71()

nname: 23
n 23(isinstance(menu, TVPlayer))[for menu in stack.menus_stack:
from pygui.menu.players import TVPlayer
]:
	i: 13(for)
	o: 57(t), 71(f)

nname: 13
n 13(None)[]:
	i: 0(loop)
	o: 23(for), 75(AF)

nname: 0
n 0(None)[stack = pygui_globs['menustack']
]:
	i: 
	o: 13(loop), 76(AL)

nname: 76
n 76(None)[return NavigatorEventHandler.event_toggle_menu(self, event)
]:
	i: 0(AL), 13(AF), 23()
	o: 

nname: 23
n 23(None)[for menu in stack.menus_stack:
from pygui.menu.players import TVPlayer
if isinstance(menu, TVPlayer):
	menu.action_info()
	continue
]:
	i: 13(for)
	o: 76()

nname: 13
n 13(None)[]:
	i: 0(loop)
	o: 23(for), 76(AF)

nname: 0
n 0(None)[stack = pygui_globs['menustack']
]:
	i: 
	o: 13(loop), 76(AL)

nname: 23
n 23(None)[for menu in stack.menus_stack:
	from pygui.menu.players import TVPlayer
	if isinstance(menu, TVPlayer):
		menu.action_info()
		continue
return NavigatorEventHandler.event_toggle_menu(self, event)
]:
	i: 0(for)
	o: 

nname: 0
n 0(None)[stack = pygui_globs['menustack']
]:
	i: 
	o: 23(for)

nname: 0
n 0(None)[stack = pygui_globs['menustack']
for menu in stack.menus_stack:
	from pygui.menu.players import TVPlayer
	if isinstance(menu, TVPlayer):
		menu.action_info()
		continue
return NavigatorEventHandler.event_toggle_menu(self, event)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec8ec>}
nname: 55
n 55(None)[return True
]:
	i: 21(), 41()
	o: 

nname: 41
n 41(None)[self.player._error_spawner()
]:
	i: 0(f)
	o: 55()

nname: 21
n 21(None)[NavigatorEventHandler.event_marker(self, event)
]:
	i: 0(t)
	o: 55()

nname: 0
n 0(isinstance(self.player.selected, ChannelItem))[]:
	i: 
	o: 21(t), 41(f)

nname: 0
n 0(None)[if isinstance(self.player.selected, ChannelItem):
	NavigatorEventHandler.event_marker(self, event)
else:
	self.player._error_spawner()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec66c>}
nname: 0
n 0(None)[self.player.execute_selected()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec4ac>}
nname: 0
n 0(None)[return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec36c>}
nname: 0
n 0(None)[self.player.action_record()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec4cc>}
nname: 0
n 0(None)[self.player.action_stop()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec40c>}
nname: 6
n 6(None)[__doc__ = 'Event handler for the TV navigator (zaplist).\n\n    Basically a standard Navigator event handler, with a few tweaks regarding\n    toggling out, item selection, and where the markerlist may only be used\n    to mark channels.\n    '
def event_toggle_menu(self, event):
	stack = pygui_globs['menustack']
	for menu in stack.menus_stack:
		from pygui.menu.players import TVPlayer
		if isinstance(menu, TVPlayer):
			menu.action_info()
			continue
	return NavigatorEventHandler.event_toggle_menu(self, event)

def event_marker(self, event):
	if isinstance(self.player.selected, ChannelItem):
		NavigatorEventHandler.event_marker(self, event)
	else:
		self.player._error_spawner()
	return True

def event_select(self, event):
	self.player.execute_selected()
	return True

def event_info(self, *args, **args):
	return True

def event_record(self, event):
	self.player.action_record()
	return True

def event_stop(self, event):
	self.player.action_stop()
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb75e6e4c>}
nname: 0
n 0(None)[return False
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec68c>}
nname: 44
n 44(None)[return True
]:
	i: 15(), 43()
	o: 

nname: 43
n 43(None)[]:
	i: 0(t)
	o: 44()

nname: 15
n 15(None)[self.player.select_program(-event.arg['count'])
]:
	i: 0(f)
	o: 44()

nname: 0
n 0(self.player.update_channels_timer.running)[]:
	i: 
	o: 15(f), 43(t)

nname: 0
n 0(None)[if not self.player.update_channels_timer.running:
	self.player.select_program(-event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ecb2c>}
nname: 43
n 43(None)[return True
]:
	i: 15(), 42()
	o: 

nname: 42
n 42(None)[]:
	i: 0(t)
	o: 43()

nname: 15
n 15(None)[self.player.select_program(event.arg['count'])
]:
	i: 0(f)
	o: 43()

nname: 0
n 0(self.player.update_channels_timer.running)[]:
	i: 
	o: 15(f), 42(t)

nname: 0
n 0(None)[if not self.player.update_channels_timer.running:
	self.player.select_program(event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ecaec>}
nname: 0
n 0(None)[self.player.select_channel(-event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec8cc>}
nname: 0
n 0(None)[self.player.select_channel(event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ecbec>}
nname: 34
n 34(None)[return True
]:
	i: 15(), 33()
	o: 

nname: 33
n 33(None)[]:
	i: 0(f)
	o: 34()

nname: 15
n 15(None)[pygui_globs['menustack'].back_to_player()
]:
	i: 0(t)
	o: 34()

nname: 0
n 0(self.player.zap_to_selected())[]:
	i: 
	o: 15(t), 33(f)

nname: 0
n 0(None)[if self.player.zap_to_selected():
	pygui_globs['menustack'].back_to_player()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ecaec>}
nname: 0
n 0(None)[self.player.action_record()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ecaec>}
nname: 0
n 0(None)[self.player.cancel_record_selected()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ecb2c>}
nname: 0
n 0(None)[self.player.display_control_window()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ecbac>}
nname: 0
n 0(None)[self.player.display_info_banner()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ecb0c>}
nname: 0
n 0(None)[pygui_globs['menustack'].back_one_menu()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec96c>}
nname: 0
n 0(None)[self.player._error_spawner()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ecccc>}
nname: 6
n 6(None)[__doc__ = 'Event handler for the EPG grid.'
def event_DEFAULT(self, event):
	return False

def event_up(self, event):
	if not self.player.update_channels_timer.running:
		self.player.select_program(-event.arg['count'])
	return True

event_wheel_rwd = event_up
def event_down(self, event):
	if not self.player.update_channels_timer.running:
		self.player.select_program(event.arg['count'])
	return True

event_wheel_fwd = event_down
def event_left(self, event):
	self.player.select_channel(-event.arg['count'])
	return True

def event_right(self, event):
	self.player.select_channel(event.arg['count'])
	return True

def event_select(self, event):
	if self.player.zap_to_selected():
		pygui_globs['menustack'].back_to_player()
	return True

def event_record(self, event):
	self.player.action_record()
	return True

def event_stop(self, event):
	self.player.cancel_record_selected()
	return True

def event_toggle_menu(self, event):
	self.player.display_control_window()
	return True

def event_info(self, event):
	self.player.display_info_banner()
	return True

def event_action_menu(self, event):
	pygui_globs['menustack'].back_one_menu()
	return True

def event_marker(self, event):
	self.player._error_spawner()
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb75ec4ac>}
nname: 0
n 0(None)[self.player._error_spawner()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec78c>}
nname: 0
n 0(None)[self.player.select_value(-event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec22c>}
nname: 0
n 0(None)[self.player.select_value(event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec8ec>}
nname: 0
n 0(None)[self.player.select_field(-event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec38c>}
nname: 0
n 0(None)[self.player.select_field(event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec60c>}
nname: 0
n 0(None)[pygui_globs['menustack'].back_one_menu()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec5ec>}
nname: 0
n 0(None)[self.player.display_info_banner()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec3cc>}
nname: 6
n 6(None)[__doc__ = 'Event handler for the EPG control window (spawned by\n    pressing list on the EPG grid).\n    '
def event_DEFAULT(self, event):
	self.player._error_spawner()
	return True

def event_up(self, event):
	self.player.select_value(-event.arg['count'])
	return True

def event_down(self, event):
	self.player.select_value(event.arg['count'])
	return True

def event_left(self, event):
	self.player.select_field(-event.arg['count'])
	return True

def event_right(self, event):
	self.player.select_field(event.arg['count'])
	return True

def event_toggle_menu(self, event):
	pygui_globs['menustack'].back_one_menu()
	return True

def event_info(self, event):
	self.player.display_info_banner()
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb75e6d8c>}
nname: 0
n 0(None)[self.player._error_spawner()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec3ec>}
nname: 0
n 0(None)[self.player.select_page(-event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec3cc>}
nname: 0
n 0(None)[self.player.select_page(event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec30c>}
nname: 0
n 0(None)[pygui_globs['menustack'].back_one_menu()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ec54c>}
nname: 6
n 6(None)[__doc__ = 'Event handler for the EPG full info banner (spawned\n    by pressing info on the EPG grid).\n    '
def event_DEFAULT(self, event):
	self.player._error_spawner()
	return True

def event_up(self, event):
	self.player.select_page(-event.arg['count'])
	return True

def event_down(self, event):
	self.player.select_page(event.arg['count'])
	return True

def event_info(self, event):
	pygui_globs['menustack'].back_one_menu()
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb75e6fcc>}
nname: 0
n 0(None)[from __future__ import absolute_import
from pygui.eventmanager import EventDispatcher
from pygui.shared import pygui_globs
from pygui.item.mediaitem.core import ChannelItem
from .navigator_menu import NavigatorEventHandler
class TvNavigatorEventHandler(NavigatorEventHandler):
	__doc__ = 'Event handler for the TV navigator (zaplist).\n\n    Basically a standard Navigator event handler, with a few tweaks regarding\n    toggling out, item selection, and where the markerlist may only be used\n    to mark channels.\n    '
	def event_toggle_menu(self, event):
		stack = pygui_globs['menustack']
		for menu in stack.menus_stack:
			from pygui.menu.players import TVPlayer
			if isinstance(menu, TVPlayer):
				menu.action_info()
				continue
		return NavigatorEventHandler.event_toggle_menu(self, event)

	def event_marker(self, event):
		if isinstance(self.player.selected, ChannelItem):
			NavigatorEventHandler.event_marker(self, event)
		else:
			self.player._error_spawner()
		return True

	def event_select(self, event):
		self.player.execute_selected()
		return True

	def event_info(self, *args, **args):
		return True

	def event_record(self, event):
		self.player.action_record()
		return True

	def event_stop(self, event):
		self.player.action_stop()
		return True



class EpgGridEventHandler(EventDispatcher):
	__doc__ = 'Event handler for the EPG grid.'
	def event_DEFAULT(self, event):
		return False

	def event_up(self, event):
		if not self.player.update_channels_timer.running:
			self.player.select_program(-event.arg['count'])
		return True

	event_wheel_rwd = event_up
	def event_down(self, event):
		if not self.player.update_channels_timer.running:
			self.player.select_program(event.arg['count'])
		return True

	event_wheel_fwd = event_down
	def event_left(self, event):
		self.player.select_channel(-event.arg['count'])
		return True

	def event_right(self, event):
		self.player.select_channel(event.arg['count'])
		return True

	def event_select(self, event):
		if self.player.zap_to_selected():
			pygui_globs['menustack'].back_to_player()
		return True

	def event_record(self, event):
		self.player.action_record()
		return True

	def event_stop(self, event):
		self.player.cancel_record_selected()
		return True

	def event_toggle_menu(self, event):
		self.player.display_control_window()
		return True

	def event_info(self, event):
		self.player.display_info_banner()
		return True

	def event_action_menu(self, event):
		pygui_globs['menustack'].back_one_menu()
		return True

	def event_marker(self, event):
		self.player._error_spawner()
		return True



class EpgControlWindowEventHandler(EventDispatcher):
	__doc__ = 'Event handler for the EPG control window (spawned by\n    pressing list on the EPG grid).\n    '
	def event_DEFAULT(self, event):
		self.player._error_spawner()
		return True

	def event_up(self, event):
		self.player.select_value(-event.arg['count'])
		return True

	def event_down(self, event):
		self.player.select_value(event.arg['count'])
		return True

	def event_left(self, event):
		self.player.select_field(-event.arg['count'])
		return True

	def event_right(self, event):
		self.player.select_field(event.arg['count'])
		return True

	def event_toggle_menu(self, event):
		pygui_globs['menustack'].back_one_menu()
		return True

	def event_info(self, event):
		self.player.display_info_banner()
		return True



class EpgInfoBannerEventHandler(EventDispatcher):
	__doc__ = 'Event handler for the EPG full info banner (spawned\n    by pressing info on the EPG grid).\n    '
	def event_DEFAULT(self, event):
		self.player._error_spawner()
		return True

	def event_up(self, event):
		self.player.select_page(-event.arg['count'])
		return True

	def event_down(self, event):
		self.player.select_page(event.arg['count'])
		return True

	def event_info(self, event):
		pygui_globs['menustack'].back_one_menu()
		return True



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75dfeec>}
from __future__ import absolute_import
from pygui.eventmanager import EventDispatcher
from pygui.shared import pygui_globs
from pygui.item.mediaitem.core import ChannelItem
from .navigator_menu import NavigatorEventHandler
class TvNavigatorEventHandler(NavigatorEventHandler):
	__doc__ = 'Event handler for the TV navigator (zaplist).\n\n    Basically a standard Navigator event handler, with a few tweaks regarding\n    toggling out, item selection, and where the markerlist may only be used\n    to mark channels.\n    '
	def event_toggle_menu(self, event):
		stack = pygui_globs['menustack']
		for menu in stack.menus_stack:
			from pygui.menu.players import TVPlayer
			if isinstance(menu, TVPlayer):
				menu.action_info()
				continue
		return NavigatorEventHandler.event_toggle_menu(self, event)

	def event_marker(self, event):
		if isinstance(self.player.selected, ChannelItem):
			NavigatorEventHandler.event_marker(self, event)
		else:
			self.player._error_spawner()
		return True

	def event_select(self, event):
		self.player.execute_selected()
		return True

	def event_info(self, *args, **args):
		return True

	def event_record(self, event):
		self.player.action_record()
		return True

	def event_stop(self, event):
		self.player.action_stop()
		return True



class EpgGridEventHandler(EventDispatcher):
	__doc__ = 'Event handler for the EPG grid.'
	def event_DEFAULT(self, event):
		return False

	def event_up(self, event):
		if not self.player.update_channels_timer.running:
			self.player.select_program(-event.arg['count'])
		return True

	event_wheel_rwd = event_up
	def event_down(self, event):
		if not self.player.update_channels_timer.running:
			self.player.select_program(event.arg['count'])
		return True

	event_wheel_fwd = event_down
	def event_left(self, event):
		self.player.select_channel(-event.arg['count'])
		return True

	def event_right(self, event):
		self.player.select_channel(event.arg['count'])
		return True

	def event_select(self, event):
		if self.player.zap_to_selected():
			pygui_globs['menustack'].back_to_player()
		return True

	def event_record(self, event):
		self.player.action_record()
		return True

	def event_stop(self, event):
		self.player.cancel_record_selected()
		return True

	def event_toggle_menu(self, event):
		self.player.display_control_window()
		return True

	def event_info(self, event):
		self.player.display_info_banner()
		return True

	def event_action_menu(self, event):
		pygui_globs['menustack'].back_one_menu()
		return True

	def event_marker(self, event):
		self.player._error_spawner()
		return True



class EpgControlWindowEventHandler(EventDispatcher):
	__doc__ = 'Event handler for the EPG control window (spawned by\n    pressing list on the EPG grid).\n    '
	def event_DEFAULT(self, event):
		self.player._error_spawner()
		return True

	def event_up(self, event):
		self.player.select_value(-event.arg['count'])
		return True

	def event_down(self, event):
		self.player.select_value(event.arg['count'])
		return True

	def event_left(self, event):
		self.player.select_field(-event.arg['count'])
		return True

	def event_right(self, event):
		self.player.select_field(event.arg['count'])
		return True

	def event_toggle_menu(self, event):
		pygui_globs['menustack'].back_one_menu()
		return True

	def event_info(self, event):
		self.player.display_info_banner()
		return True



class EpgInfoBannerEventHandler(EventDispatcher):
	__doc__ = 'Event handler for the EPG full info banner (spawned\n    by pressing info on the EPG grid).\n    '
	def event_DEFAULT(self, event):
		self.player._error_spawner()
		return True

	def event_up(self, event):
		self.player.select_page(-event.arg['count'])
		return True

	def event_down(self, event):
		self.player.select_page(event.arg['count'])
		return True

	def event_info(self, event):
		pygui_globs['menustack'].back_one_menu()
		return True



